package org.lex.expression;


public enum TokenType {
	END, UNKOWN, NUMERIC, ADD, MINUS, MULTIPLY, DIVIDE, MOD, POWER, LEFT_P, RIGHT_P;

	public static TokenType parseOperatorType(char ch) {
		switch (ch) {
		case '+':
			return TokenType.ADD;
		case '-':
			return TokenType.MINUS;
		case '*':
			return TokenType.MULTIPLY;
		case '/':
			return TokenType.DIVIDE;
		case '%':
			return TokenType.MOD;
		case '^':
			return TokenType.POWER;
		case '(':
			return TokenType.LEFT_P;
		case ')':
			return TokenType.RIGHT_P;
		default:
			return TokenType.UNKOWN;
		}
	}
}
